package com.example.order.component;

/**
 * DirectReceiver class
 *
 * @author zhangl
 * @date 2023/3/9 19:54
 */

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class DirectReceiver {
    @RabbitListener(queues = {"directQueue"})
    @RabbitHandler
    public void receiverMsg(String msg){
        log.info("收到一条mq消息:[{}],message:[{}]","DirectReceiver",msg);
    }
}
